package yf.mall.vo;

import lombok.Getter;
import lombok.Setter;
import yf.mall.entity.CartEntity;

import java.math.BigDecimal;

@Getter
@Setter
public class CartVo extends CartEntity {



    private String goodsName;
    private Long shopId;
    private Long shopUserId;
    private String shopName;
    private String province;
    private String city;
    private String area;
    private String shopAddress;
    private String shopAvatar;
    private Integer shopType;

    private Integer goodsSaleType;//产品销售类型

    private String skuName;

    private String img;

    private BigDecimal oldPrice;

    private BigDecimal nowPrice;

    //积分
    private BigDecimal point;

    //优惠券
    private BigDecimal coupon;

    //换购券
    private BigDecimal voucher;

    //清货券
    private BigDecimal clear;

    //sql查询临时装载
    private BigDecimal skuOldPrice;

    private BigDecimal goodsOldPrice;

    private BigDecimal skuNowPrice;

    private BigDecimal goodsNowPrice;

    private String bindGoodsName;

    private Integer bindQuantity;

    private Integer firstQuantity;

    private String level;






    //实际价格
    public BigDecimal getOldPrice() {
        if (getSkuName() == null || getSkuName().equals("")) {
            return goodsOldPrice;
        }
        return skuOldPrice;
    }

    public BigDecimal getNowPrice() {
        if (getSkuName() == null || getSkuName().equals("")) {
            return goodsNowPrice;
        }
        return skuNowPrice;
    }


}
